#ifndef HASH_H
#define HASH_H

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdio.h>

#define MULT 31

#define NATURE_SCALAR 1
#define NATURE_VEC    2
#define NATURE_PTR    3
#define NATURE_FUNC   4

#define SYMBOL_UNDEFINED 0
#define SYMBOL_LIT_INTEGER 1
#define SYMBOL_LIT_FLOATING 2
#define SYMBOL_LIT_TRUE 3
#define SYMBOL_LIT_FALSE 4
#define SYMBOL_LIT_CHAR 5
#define SYMBOL_LIT_STRING 6
#define SYMBOL_IDENTIFIER 7

typedef struct parameterList{
    struct row *v;
    struct param *next;
} param;

typedef struct row{    

    // Things to be filled later:
    int scope;
    int nature;
    param *args;
    int localI;
    int dataType;

    // IDENTIFIER or LITERAL
    unsigned int type;
    char *value;
    struct row *next;
} row;

typedef struct table{
    row **rows;
    unsigned int size;
    unsigned int size_index;
    unsigned int collisions;
} table;

unsigned int hash(char *val, unsigned int size);
void initTable(table *t);
void destroyTable(table *t);
row* get(char *val, table *t);
row* put(char *val, unsigned int type, table *t);
row* makeTemp(table *t);
row* makeLabel(table *t);

#endif
